package day9;

public class demo3 {
    public static void main(String[] args) {
int []arr={6,2,0,4,0};
        System.out.println(IsContinuous(arr));

    }



    public static boolean IsContinuous (int[] numbers) {
        boolean []arr=new boolean[14];
        int max=0;
        int min=14;
        for (int i = 0; i < numbers.length ; i++) {
            if (numbers[i]!=0){
                if (arr[numbers[i]])return false;
                arr[numbers[i]]=true;
                min=Math.min(min,numbers[i]);
                max=Math.max(max,numbers[i]);
            }
        }
        return max-min<=4;
    }

}
